<template>
	<div class="box">
		<div class="title">监控中心</div>
		<div class="list">
			<div class="item" v-for="item in $store.state.pageList" :key="item.name" @click="checkPage(item.data)">
                {{item.name}}
            </div>
		</div>
	</div>
</template>

<script>
export default {
    data(){
        return {};
    },
    methods: {
        checkPage(data) {
            this.$store.state.pageLayout = data;
            console.log('page:',this.$store.state.pageLayout);
            this.$message.success('切换页面成功');
        }
    }

};
</script>

<style lang="scss" scoped>
.title{
		height: 20px;
}
.list{
	height: calc(100% - 20px);
	overflow: auto;
	.item{
		height: 50px;
		width: 250px;
		border-bottom: 1px solid black;
		margin: 10px auto;
        text-align: center;
        line-height: 50px;
        font-size: 1.5rem;
        cursor: pointer;
	}
}
</style>